import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
import DeploymentsPage from '../views/DeploymentsPage.vue';
import DefinitionsPage from '../views/DefinitionsPage.vue';
import TasksPage from '../views/TasksPage.vue';
import InstancesPage from '../views/InstancesPage.vue';
import BpmnEditorPage from '../views/BpmnEditorPage.vue';
import MyApplicationsPage from '../views/MyApplicationsPage.vue';
import MyTasksPage from '../views/MyTasksPage.vue';

const routes: RouteRecordRaw[] = [
  { path: '/', redirect: '/deployments' },
  { path: '/deployments', component: DeploymentsPage },
  { path: '/definitions', component: DefinitionsPage },
  { path: '/tasks', component: TasksPage },
  { path: '/instances', component: InstancesPage },
  { path: '/editor', component: BpmnEditorPage },
  { path: '/my-applications', component: MyApplicationsPage },
  { path: '/my-tasks', component: MyTasksPage }
];

export default createRouter({
  history: createWebHistory(),
  routes
});
